//
//  Info.m
//  ChampoinPeso
//
//  Created by mac on 2025/2/17.
//

#import "Info.h"
#import "LocationUpdata.h"
@interface Info ()
@property (nonatomic,strong)UIButton *apply;

@end

@implementation Info

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navtitleText = @"ldentity information";
    UIImageView *bgIV = [[UIImageView alloc] initWithFrame:self.view.bounds];
    bgIV.image = [UIImage imageNamed:@"infobg"];
    [self.view addSubview:bgIV];
    [[LocationUpdata sharedInstance] startMarkTag];
    [self navUI];
    [self setupUI];
}


-(void)setupUI
{
    [self.view addSubview:self.apply];
    [_apply mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_offset(-bottomSafeHeight-5);
        make.left.mas_offset(24);
        make.right.mas_offset(-24);
        make.height.mas_equalTo(52);
    }];
    
    UIImageView *icon = [UIImageView new];
    icon.image = [UIImage imageNamed:@"ticon"];
    [self.view addSubview:icon];
    [icon mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_offset(98+64+MarginTop+20);
        make.left.mas_offset(13);
        make.right.mas_offset(-13);
    }];
    
    UIView *view = [UIView new];
    view.backgroundColor = MainColor;
    view.layer.cornerRadius = 20;
    [self.view addSubview:view];
    [view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(icon.mas_bottom).offset(10);
        make.left.mas_offset(13);
        make.right.mas_offset(-13);
        make.height.mas_equalTo(372);
    }];
    UIImageView *bg = [UIImageView new];
    bg.contentMode = UIViewContentModeScaleToFill;
    bg.image = [UIImage imageNamed:@"ibg"];
    [view addSubview:bg];
    [bg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.bottom.mas_offset(0);
    }];
    UILabel *lab = [UILabel new];
    lab.text = @"Front of ID photo";
    lab.textColor = HexColor(@"#212121");
    lab.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
    [view addSubview:lab];
    [lab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_offset(19);
        make.centerX.mas_equalTo(view);
    }];
    
    UIImageView *pimg = [UIImageView new];
    pimg.image = [UIImage imageNamed:@"pic"];
    [view addSubview:pimg];
    [pimg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(lab.mas_bottom).offset(13);
        make.centerX.mas_equalTo(view);
    }];
    
    UILabel *dlab = [UILabel new];
    dlab.numberOfLines = 2;
    dlab.text = @"Please submit certification according to the example to avoid blurring, obstruction, and reflection";
    dlab.textColor = HexColor(@"#212121");
    dlab.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
    [view addSubview:dlab];
    [dlab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(pimg.mas_bottom).offset(20);
        make.left.mas_offset(23);
        make.right.mas_offset(-23);
    }];

    UIImageView *bottom = [UIImageView new];
    bottom.image = [UIImage imageNamed:@"bimg"];
    [view addSubview:bottom];
    [bottom mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_offset(-20);
        make.centerX.mas_equalTo(view);
    }];

}

-(UIButton *)apply
{
    if (!_apply) {
        _apply = [UIButton buttonWithType:UIButtonTypeCustom];
        [_apply setImage:[UIImage imageNamed:@"auth_apply_bg"] forState:UIControlStateNormal];
    }
    return _apply;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
